package com.picket.service;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Service;

import com.google.appengine.api.datastore.Key;
import com.picket.dao.IGreetingsDao;
import com.picket.domain.Greeting;

@Service
public class GreetingsService implements  IGreetingsService{
	 
	 private IGreetingsDao greetingsDao;
	  
	 @Required
	 public void setGreetingsDao(
	      final IGreetingsDao greetingsDao) {
	    this.greetingsDao = greetingsDao;
	 }
	 
	 @Override
	 public Key create(final Greeting greeting) {
	  return greetingsDao.create(greeting);
	 }
	 
	 @Override
	 public Collection<Greeting> getAllGreetings() {
	  return greetingsDao.getAllGreetings();
	 }
	 
}
